﻿<?php
require_once(dirname(__FILE__)."/../../libs/login/login.php");
require_once(dirname(__FILE__)."/../../libs/dbclass/dbconnect.php");
require_once(dirname(__FILE__)."/../../libs/string/libstr.php");
require_once(dirname(__FILE__)."/../../admin/libs/config_class.php");
$lg=new login();
$lg->checklogin("admin_member");//检验是否登录
$mc=new libstr();
$cf=new config();
//获得网站信息
$msg=$cf->getInfo('email_info');
//更新
if($mc->Ismp($_POST["msgbtn"])!=""){

	$data=array();
	$data['smtpserver']=$mc->request("smtpserver","");
	$data['smtpport']=$mc->request("smtpport","");
	$data['smtppwd']=$mc->request("smtppwd","");
	$data['smtpemail']=$mc->request("smtpemail","");
	$data['toemail']=$mc->request("toemail","");
	
	if($db->is_have('email_info')){   //查询是有记录
		$db->update_data("email_info",$data);
		$mc->msg("更新信息成功!");
	}else{
		$db->add_data("email_info",$data);
		$mc->msg("更新信息成功!");
	}
	
	
}

$path="邮箱服务器设置";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="../../plug/swfupload/uploadify.css">
<link href="../css/css.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="../js/jquery.js"></script>

</head>
<body style="background:#fff"> 
<div class="content">
    <div class="right">
<form name="form1" method="post" action="">

  <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
          <td width="100%" height="24" class="top_head">&nbsp;</td>
        </tr>
        <tr>
          <td valign="top">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="1%" align="right"  height="45">&nbsp;</td>
                  <td width="99%" >
                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="55%" style="padding-left:20px;padding-top:10px;"><toemailg src="../toemailages/head.gif" width="13" height="11"><b><?php echo $path;?></b><font> &nbsp;(多个用逗号隔开)</font></td>
                      <td width="45%" align="right">&nbsp;</td>
                    </tr>
                  </table>
                  </td>
                </tr>
              </table>
          </td>
        </tr>
 </table>
   
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="liebiao">
  <tr>
    <td width="11%" height="40" align="right" valign="middle">SMTP服务器：</td>
    <td height="40" valign="middle"><input type="text" name="smtpserver" id="smtpserver"  value="<?php echo $msg["smtpserver"]?>"/></td>
    </tr>
     <tr>
    <td width="11%" height="40" align="right" valign="middle">SMTP服务器端口：</td>
    <td height="40" valign="middle"><input type="text" name="smtpport" id="smtpport" value="<?php echo $msg["smtpport"]?>"/></td>
    </tr> 
  
  <tr>
    <td height="40" align="right" valign="middle" style="padding:10px 0 0 0">SMTP邮箱：</td>
    <td height="40" valign="middle" ><input type="text" name="smtpemail" id="smtpemail"  value="<?php echo $msg["smtpemail"]?>"/><Font>
  </Font></td>
    </tr>
  <tr>
    <td height="40" align="right" valign="middle">SMTP邮箱密码：</td>
    <td height="40" valign="middle"><input type="text" name="smtppwd" id="smtppwd"  value="<?php echo "*********"?>"/><Font>
  </Font></td>
    </tr>
  
  <tr>
    <td height="40" align="right" valign="middle">用户接收邮箱：</td>
    <td height="40" valign="middle"><input type="text" name="toemail" id="toemail"  value="<?php echo $msg["toemail"]?>"/><font></font></td>
    </tr>
    <tr>
    <td height="40" align="right" valign="middle">&nbsp;</td>
    <td height="40" valign="middle"><bdo>
      <input type="submit" name="msgbtn" value="提交">
    </bdo></td>
    </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td width="5%" height="40" align="right" valign="middle"></td>
    <td height="100" valign="middle"><p><b>说明：</b>页面信息POST到"/libs/dataclass/sendemail.php"进行处理</p></td>
    </tr>
    
    </table>
</form>
</div>
</div>
</body>
</html>

